<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
  <title>申请预约</title>
  <style>
    body {
      font-family: Arial, sans-serif;
      background-color: #f4f4f4;
      margin: 0;
      padding: 20px;
    }
    form {
      background-color: #fff;
      padding: 20px;
      border: 1px solid #ddd;
      border-radius: 5px;
      box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    }
    label {
      display: block;
      margin-bottom: 10px;
    }
    input[type="datetime-local"] {
      width: 100%;
      padding: 8px;
      margin-bottom: 15px;
      border: 1px solid #ddd;
      border-radius: 3px;
    }
    input[type="text"] {
      width: 100%;
      padding: 8px;
      margin-bottom: 15px;
      border: 1px solid #ddd;
      border-radius: 3px;
    }
    input[type="submit"] {
      background-color: #4CAF50;
      color: white;
      padding: 10px 20px;
      border: none;
      border-radius: 3px;
      cursor: pointer;
    }
    input[type="submit"]:hover {
      background-color: #45a049;
    }
  </style>
</head>
<body>
<h2>申请预约</h2>
<form action="${pageContext.request.contextPath}/submitApply" method="post">
  <label for="startTime">开始时间:</label>
  <input type="datetime-local" id="startTime" name="startTime" required>
  <label for="endTime">结束时间:</label>
  <input type="datetime-local" id="endTime" name="endTime" required>
  <label for="reason">申请原因:</label>
  <input type="text" id="reason" name="reason" required>
  <input type="text" name="classroomId" value="${param.classroomId}">
  <input type="text" name="userId" value="${param.userId}"> <!-- 存储从原页面传递过来的用户 ID -->
  <input type="submit" value="提交申请">
</form>
<a href="${pageContext.request.contextPath}/classroomList">返回教室列表</a>
</body>
</html>